﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OptiGear1
{
    class WowheadParser
    {

        public static List<int> LoadItemsFromUrl(string url)
        {
            List<int> items = new List<int>();

            string itemstring = Utils.GetHtml(url);
            while (itemstring.IndexOf("_[") > 0)
            {
                int start = itemstring.IndexOf("_[");
                itemstring = itemstring.Substring(start + 2);
                int end = itemstring.IndexOf("]");
                items.Add(Int32.Parse(itemstring.Substring(0, end)));
            }
            return items;
        }

    }
}
